<#assign post=post!{}>
<#assign posttags><#list (post.tags![]) as tag>${tag} </#list></#assign>
<div class="md">
  <form method="post" class="etag">
  	<input type="hidden" class="etag" value="${(post.id)!0}" />
    <span><label for="title">标&nbsp;&nbsp;&nbsp;&nbsp;题：</label><input name="title" type="text" class="input etag" value="${post.title!""}"/></span><br/>
	<textarea style="display:none;" id="editor" name="editor">${(post.content.value)?default("")?html}</textarea>
	<table>
	  <tr><td class="first"><label for="tags">标&nbsp;&nbsp;签：</label></td><td><input name="tags" id="tags" type="text" class="input etag" value="${posttags?default("")?trim}"/></td></tr>
	  <tr><td class="first"><label for="keyword">关 键 字：</label></td><td><input name="keyword" id="keyword" type="text" class="input etag" value="${post.keyword?default("")?trim}"/></td></tr>
	  <tr><td class="first"><label for="category">分&nbsp;&nbsp;类：</label></td><td><select name="category" id="category" class="etag"></select>&nbsp;&nbsp;<span class="m2a etag">创建分类</span></td></tr>
	  <tr><td class="first">设&nbsp;&nbsp;置：</td><td>	<input type="checkbox" id="allowview" name="allowview" class="etag" <#if post.publiced!true>checked="checked"</#if> /><label for="allowview">公开</label>
                                        &nbsp;&nbsp;<input type="checkbox" id="allowcomment" name="allowcomment" class="etag" <#if post.allowComment!true>checked="checked"</#if> /><label for="allowcomment">允许评论</label></td></tr>
	  <tr><td class="first"><label for="abstract">摘&nbsp;&nbsp;要：</label></td><td><textarea name="abstract" id="abstract" class="input etag">${(post.digest.value)?default("")?html}</textarea></td></tr>
	</table>
  </form>
  <div><button class="etag" value="发表日志"><#if post.published!false>更新<#else>发表</#if>日志</button><button class="etag<#if post.published!false> hidden</#if>" value="保存到草稿箱">保存到草稿箱</button></div>
</div>
<div id="category_dlg"></div>
<script>
 var categorys = ${Utils.obj2Json(categorys)};
 var postClassId = ${(post.categoryId)?default(-1)};
</script>